package com.xbb.entity;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xbb.entity.Category;
import com.xbb.entity.User;

public class Commodity{

    private static final long serialVersionUID = 1L;

    //  产品ID
    private Integer id;

    //  名称
    private String name;

    //  价格
    private Double price;

    //  分类ID
    private Integer categoryId;

    //  库存
    private Integer inventory;

    //  编号
    private String number;

    //  展示图
    private String img;

    //  描述
    private String describes;

    //  兑换量
    private Integer salesVolume;

    //  预警值
    private Integer warning;

    //  上架状态
    private Boolean status;

    //  内容
    private String content;

    //  用户ID
    private Integer userId;

    //  兑换积分
    private Integer integrate;

    private Category category;

    private User user;

    public void setId(Integer id){
        this.id = id;
    }

    public Integer getId(){
        return id;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return name;
    }

    public void setPrice(Double price){
        this.price = price;
    }

    public Double getPrice(){
        return price;
    }

    public void setCategoryId(Integer categoryId){
        this.categoryId = categoryId;
    }

    public Integer getCategoryId(){
        return categoryId;
    }

    public void setInventory(Integer inventory){
        this.inventory = inventory;
    }

    public Integer getInventory(){
        return inventory;
    }

    public void setNumber(String number){
        this.number = number;
    }

    public String getNumber(){
        return number;
    }

    public void setImg(String img){
        this.img = img;
    }

    public String getImg(){
        return img;
    }

    public void setDescribes(String describes){
        this.describes = describes;
    }

    public String getDescribes(){
        return describes;
    }

    public void setSalesVolume(Integer salesVolume){
        this.salesVolume = salesVolume;
    }

    public Integer getSalesVolume(){
        return salesVolume;
    }

    public void setWarning(Integer warning){
        this.warning = warning;
    }

    public Integer getWarning(){
        return warning;
    }

    public void setStatus(Boolean status){
        this.status = status;
    }

    public Boolean getStatus(){
        return status;
    }

    public void setContent(String content){
        this.content = content;
    }

    public String getContent(){
        return content;
    }

    public void setUserId(Integer userId){
        this.userId = userId;
    }

    public Integer getUserId(){
        return userId;
    }

    public void setIntegrate(Integer integrate){
        this.integrate = integrate;
    }

    public Integer getIntegrate(){
        return integrate;
    }

    public Category getCategory(){
        return category;
    }

    public void setCategory(Category category){
        this.category = category;
    }

    public User getUser(){
        return user;
    }

    public void setUser(User user){
        this.user = user;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("price", getPrice())
                .append("categoryId", getCategoryId())
                .append("inventory", getInventory())
                .append("number", getNumber())
                .append("img", getImg())
                .append("describes", getDescribes())
                .append("salesVolume", getSalesVolume())
                .append("warning", getWarning())
                .append("status", getStatus())
                .append("content", getContent())
                .append("userId", getUserId())
                .append("integrate", getIntegrate())
                .toString();
    }
}
